##from ..fsts import FastSTS, ChildWrapper
##from ..sts import NodeWrapper, move_score
##
##class FastBFS(FastSTS):
##    """Fast (i.e. lazy) breadth-first tree search algorithm. The only things that must be 
##    changed are the queue manipulation methods fetch_node() and queue_children()."""
##    def fetch_node(self):
##        current = self.queue.pop()
##        node = self.copy(current.parent.node)
##        self.apply(node, current.move)
##        # Check the modified node's "leafness" and lower bound.
##        if self.is_leaf(node):
##            self.check_leaf(node)
##            return None
##        lower_bound = self.lower_bound(node)
##        if lower_bound >= self.upper_bound:
##            self.pruned += 1
##            return None
##        return NodeWrapper(node, None, lower_bound)
##        
##    def queue_children(self, parent, scored_moves):
##        if scored_moves is None:
##            scored_moves = self.moves(parent.node)
##            scored_moves.sort(key=move_score)
##        self.queue.extendleft([ChildWrapper(parent, move, score) for move, score in scored_moves])
##        while len(self.queue) > self.queue_limit:
##            self.queue.popleft()
##            self.discarded += 1
##            
